﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>new document </title>
        <link rel="stylesheet" href="css\bootstrap.css">
        <script src="js/jquery-1.11.3.js">
        </script>
        <script src="js/bootstrap.js">
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8">
    </head>
    <body>
        <header>
            <nav class="navbar navbar-default" style="margin:auto">
                <div class="container">
                    <ul class="nav nav-tabs">
                        <li>
                            <a href="dcxt.php" class="btn btn-default" type="button" style="border:0px;margin:8px 0">
                                点餐系统
                            </a>
                        </li>
                        <li>
                            <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="border:0px;margin:8px 0;">
                                订单管理<span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="lx">
                                <li>
                                    <a href="list.php">订单列表</a>
                                </li>
                                <li>
                                    <a href="history.php">订单记录</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="border:0px;margin:8px 0;">
                                菜品管理<span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="lx">
							
                                <li>
                                    <a href="dishappend.php">添加菜品</a>
                                </li>
                                <li>
                                    <a href="dishlist.php">菜品列表</a>
                                </li>
								 <li>
                                    <a href="dishtype.php">添加菜品类型</a>
                                </li> <li>
                                    <a href="typelist.php">菜品类型列表</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="border:0px;margin:8px 0;">
                                餐桌管理<span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="lx">
                                <li>
                                    <a href="appendtable.php">添加餐桌</a>
                                </li>
                                <li>
                                    <a href="tablelist.php">餐桌列表</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="border:0px;margin:8px 0;">
                                登录管理<span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="lx">
                                <li>
                                    <a href="modifier.php">修改登陆信息</a>
                                </li>
                                <li>
                                    <a href="#">退出登录</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
		<div class="container">
			<div class="row" style="width:80%">
				<div class="col-xs-2 paga-left">
				<a href="dishappend.php" class="btn btn-default btn-block">添加菜品</a>
				<a href="dcxt.php" class="btn btn-default btn-block">返回主页</a>
				</div>
				<div class="col-xs-8 panel panel-default">
					<div class="panel-heading">
						 <span class="glyphicon glyphicon-th-list">菜品列表</span>
					</div>
					<div class="panel-body">
						<table class="table table-bordered">
							<tr class="active">
							<td>菜品</td>
							<td>类型</td>
							<td>单价</td>
							<td>&nbsp</td>
							</tr>
							<?php
								$pdo=new PDO('mysql:dbname=test;charset=utf8','root'); 
								$sel=$pdo->prepare('select * from menu');
								$sel->execute(array());
								$d=$sel->fetchAll(PDO::FETCH_NAMED);
								foreach($d as $e){
							?>
							<tr> 
								<td> <?php echo $e['name'] ?> </td> 
								<td> <?php echo $e['dishtype'] ?> </td>
								<td> <?php echo $e['value'] ?> </td>
								<td> <a href="#">编辑</a> <a href="#">删除</a> </td>
							</tr>
							<?php } ?>
						</table>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
